/********************************************
 * 功能说明: 
 * 模块名称: 
 * 系统名称: 
 * 软件版权: 
 * 系统版本: 1.0.0
 * 开发人员: Frank
 * 开发时间: 2019/12/4 0:17
 * 审核人员: 
 * 相关文档: 
 * 修改记录: 修改日期 修改人员 修改说明
 *********************************************/
package com.spring.arch.uaa.oauth2.dynamic;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.http.HttpMethod;

import java.io.Serializable;

/**
 * url pattern
 * @author Frank
 * @version 1.0.0.1
 * @since 2019/12/4 0:17
 */
@EqualsAndHashCode
@NoArgsConstructor
@Getter
@Setter
public class UrlPattern implements Serializable {

    private static final long serialVersionUID = 6468391887366971904L;

    private String url;
    private HttpMethod method;

    public UrlPattern(String url, String method) {
        this.method = HttpMethod.valueOf(method);
        this.url = url;
    }

    public UrlPattern(String url, HttpMethod method) {
        this.method = method;
        this.url = url;
    }
}
